/*
*  Copyright 2019-2020 Zheng Jie
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package me.zhengjie.business.domain;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import cn.hutool.core.bean.BeanUtil;
import io.swagger.annotations.ApiModelProperty;
import cn.hutool.core.bean.copier.CopyOptions;
import lombok.ToString;
import me.zhengjie.base.BaseBusiness;
import org.hibernate.annotations.GenericGenerator;
import javax.persistence.*;
import javax.validation.constraints.*;
import java.sql.Timestamp;
import java.io.Serializable;
import java.util.Objects;

/**
* @website https://el-admin.vip
* @description /
* @author xiahongbo
* @date 2022-06-06
**/
@Entity
@Data
@Table(name="BIS_JZDJ")
public class Jzdj extends BaseBusiness implements Serializable {

    @Id
    @Column(name = "BIS_JZDJ_ID")
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "JzdjSeqGenerator")
    @SequenceGenerator(name = "JzdjSeqGenerator", sequenceName = " SEQUENCE_JZDJ", allocationSize = 1)
    @ApiModelProperty(value = "主键ID")
    private Long bisJzdjId;

    @Column(name = "BIS_JZDJ_ZHSQ_ID")
    @ApiModelProperty(value = "照护ID")
    private Long bisJzdjZhsqId;

    @Column(name = "BIS_JZDJ_LSH")
    @ApiModelProperty(value = "就诊流水号")
    private String bisJzdjLsh;

    @Column(name = "BIS_JZDJ_YLLB")
    @ApiModelProperty(value = "医疗类别")
    private String bisJzdjYllb;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @Column(name = "BIS_JZDJ_RYRQ")
    @ApiModelProperty(value = "入院日期")
    private String bisJzdjRyrq;

    @Column(name = "BIS_JZDJ_CYRQ")
    @ApiModelProperty(value = "出院日期")
    private String bisJzdjCyrq;

    @Column(name = "BIS_JZDJ_RYJBBM")
    @ApiModelProperty(value = "入院疾病编码")
    private String bisJzdjRyjbbm;

    @Column(name = "BIS_JZDJ_GHF")
    @ApiModelProperty(value = "挂号费")
    private Long bisJzdjGhf;

    @Column(name = "BIS_JZDJ_ZCF")
    @ApiModelProperty(value = "诊查费")
    private Long bisJzdjZcf;

    @Column(name = "BIS_JZDJ_CYJBBM")
    @ApiModelProperty(value = "出院疾病编码")
    private String bisJzdjCyjbbm;

    @Column(name = "BIS_JZDJ_JBR")
    @ApiModelProperty(value = "经办人")
    private String bisJzdjJbr;

    @Column(name = "BIS_JZDJ_JBRQ")
    @ApiModelProperty(value = "经办日期")
    private String bisJzdjJbrq;

    @Column(name = "BIS_JZDJ_FPH")
    @ApiModelProperty(value = "发票号")
    private String bisJzdjFph;

    @Column(name = "BIS_JZDJ_CYZT")
    @ApiModelProperty(value = "出院状态")
    private String bisJzdjCyzt;

    @Column(name = "BIS_JZDJ_SPR")
    @ApiModelProperty(value = "审批人")
    private String bisJzdjSpr;

    @Column(name = "BIS_JZDJ_ZCYYMC")
    @ApiModelProperty(value = "转出医院名称")
    private String bisJzdjZcyymc;

    @Column(name = "BIS_JZDJ_KSMC")
    @ApiModelProperty(value = "科室名称")
    private String bisJzdjKsmc;

    @Column(name = "BIS_JZDJ_BS")
    @ApiModelProperty(value = "病室")
    private String bisJzdjBs;

    @Column(name = "BIS_JZDJ_CWH")
    @ApiModelProperty(value = "床位号")
    private String bisJzdjCwh;

    @Column(name = "BIS_JZDJ_YSXM")
    @ApiModelProperty(value = "医生姓名")
    private String bisJzdjYsxm;

    @Column(name = "BIS_JZDJ_HZLXFS")
    @ApiModelProperty(value = "患者联系方式")
    private String bisJzdjHzlxfs;

    @Column(name = "BIS_JZDJ_JSLXFS")
    @ApiModelProperty(value = "家属联系方式")
    private String bisJzdjJslxfs;

    @Column(name = "BIS_JZDJ_SFZ")
    @ApiModelProperty(value = "身份证")
    private String bisJzdjSfz;

    @Column(name = "BIS_JZDJ_JYLX")
    @ApiModelProperty(value = "交易类型（住院标识：1登记，2修改，3出院登记，-1无费退院/退号）")
    private String bisJzdjJylx;

    @Column(name = "BIS_JZDJ_JJX")
    @ApiModelProperty(value = "警戒线")
    private String bisJzdjJjx;

    @Column(name = "BIS_JZDJ_SPKSSJ")
    @ApiModelProperty(value = "审批开始时间")
    private String bisJzdjSpkssj;

    @Column(name = "BIS_JZDJ_SPZZSJ")
    @ApiModelProperty(value = "审批终止时间")
    private String bisJzdjSpzzsj;

    @Column(name = "BIS_JZDJ_ORDER_ID")
    @ApiModelProperty(value = "订单ID")
    private String bisJzdjOrderId;

    public void copy(Jzdj source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }

    @Override
    public int hashCode() {
        return Objects.hash(bisJzdjId, bisJzdjLsh);
    }
}